/*************************************************************************
    > File Name: test_fork.c
    > Author: ma6174
    > Mail: ma6174@163.com 
    > Created Time: Tue 28 Oct 2025 09:55:27 AM CST
 ************************************************************************/

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{
	printf("I am a process, pid: %d, ppid: %d\n",getpid(), getppid());

	pid_t id = fork();
	(void*)id;
	printf("I am a 分支! pid: %d, ppid: %d\n",getpid(),getppid());
	sleep(1);
	return 0;
}


